﻿@************************************************************************************//
// Autor:  			                							     				*//
//***********************************************************************************//
// Asignacion()	Acceso solo ADMINISTRADOR											*//
// Vista que devuelve la plantilla para asignar un BI nuevo. 						*//
// _________________________________________________________________________________*@

@model SIBI.Models.BienInformatico

@{
    ViewBag.Title = "Asignacion";
}

<h2>Asignación</h2>
<div class="error">
@ViewBag.CargoCecoDiv
</div>
<script src="@Url.Content("~/Scripts/myScript3.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/myScript4.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.autocomplete.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/myScript7.js")" type="text/javascript"></script>
<script type="text/javascript">
    disableParDropList(['#EstadoId']);
    disablePar(['#nombre']);
</script>
<script type="text/javascript" src="../../Scripts/animatedcollapse.js"></script>
<script type="text/javascript">

    animatedcollapse.addDiv('datosB', 'fade=1,height=225px')
    animatedcollapse.addDiv('datosF', 'fade=1,height=110px')
    animatedcollapse.addDiv('datosL', 'fade=1,height=160px')
    animatedcollapse.addDiv('datosD', 'fade=1,height=160px')
    animatedcollapse.addDiv('datosC', 'fade=1,height=180px')

    animatedcollapse.ontoggle = function ($, divobj, state) {
    }

    animatedcollapse.init()

</script>
<legend>Bien Informático <b><a href="javascript:animatedcollapse.show(['datosB','datosF','datosL','datosD','datosC'])">Mostrar</a> | <a href="javascript:animatedcollapse.hide(['datosB','datosF','datosL','datosD','datosC'])">Ocultar</a></b></legend>
<br />

@using (Html.BeginForm())
{
    
    @Html.ValidationSummary(true)
    <input id="MarcaModeloId" name="MarcaModeloId" value="@(ViewBag.MarcaModeloId)" type="text" style="visibility:hidden; height:0px" />
    <input id="CargoId" name="CargoId" value="@(ViewBag.CargoId)" type="text" style="visibility:hidden; height:0px" />
    <input id="ceco_id" name="ceco_id" value="@(ViewBag.ceco_id)" type="text" style="visibility:hidden; height:0px" />
    <input id="localidad_id" name="localidad_id" value="@(ViewBag.localidad_id)" type="text" style="visibility:hidden; height:0px" /><br /> 

<b><a href="#" style="text-decoration:none" rel="toggle[datosB]" data-openimage="../../Content/images/minus.jpg" data-closedimage="../../Content/images/plus.png"><img src="../../Content/images/plus.png" border="0" /> Datos Básicos </a></b>
<div id="datosB" style="display:none">
<fieldset>
<br />
<table width="100%">
        <tr>
            <td width="33%">
                <div class="editor-label">
                    Número Serial (*)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.BienInformaticoId)<br />  
                    @Html.ValidationMessageFor(model => model.BienInformaticoId)
                    <div class="error">@ViewBag.FailSerial</div>
                </div>
            </td>
            <td width="33%">
                <div class="editor-label">
                    Tipo de Bien (*)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("TipoBienId", String.Empty)<br /> 
                    @Html.ValidationMessageFor(model => model.TipoBienId)
                </div> 
            </td>
            <td width="33%">
                <div class="editor-label">
                    Modelo (*)
                </div>
                <div class="editor-field">
                    @*<div id="DialogMarcaModeloAsignacion" title="Marca y Modelos"></div>*@
                    @*@Html.DropDownList("MarcaModeloId", String.Empty)<br /> *@
                    <input id="MarcaModeloId_Visible" type="text" value="@(ViewBag.MarcaModeloId_Visible)" name="MarcaModeloId_Visible" /><br /> 
                    @Html.ValidationMessageFor(model => model.MarcaModeloId)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    Número N° Anexo/Factura
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.nanf)<br /> 
                    @Html.ValidationMessageFor(model => model.nanf)<div class="error"> @ViewBag.FailAnexo </div>
                </div>
            </td>
            <td>
                <div class="editor-label">
                    Número N° Etiqueta/Activo
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.nena)<br /> 
                    @Html.ValidationMessageFor(model => model.nena)<div class="error"> @ViewBag.FailAnexo </div>
                </div>
            </td>
            <td>
                <div class="editor-label">
                    Id Padre
                </div>
                <div class="editor-field">
                    @*<div id="DialogSerialAsignacion" title="Seriales"></div> *@
                    @*@Html.DropDownList("PadreId", String.Empty)<br /> *@
                    <input id="PadreId" type="text" value="@(ViewBag.PadreId)" name="PadreId" /><br /> 
                    @Html.ValidationMessageFor(model => model.PadreId)
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    Estado
                </div>
                <div class="desabilitado">
                    @Html.DropDownList("EstadoId", String.Empty)<br /> 
                    @Html.ValidationMessageFor(model => model.EstadoId)
                </div>
            </td>
            <td>
                <div class="editor-label">
                    Cargo Usuario (* CPU, Monitor, Laptop)
                </div>
                <div class="editor-field">
                    @*<div id="DialogCargoAsignacion" title="Cargos"></div> *@
                    @*@Html.DropDownList("CargoId", String.Empty)<br /> *@
                    <input id="CargoId_Visible" value="@(ViewBag.CargoId_Visible)" name="CargoId_Visible" type="text" /><br /> 
                    @Html.ValidationMessageFor(model => model.CargoId)
                </div>
            </td>
            <td>
                <div class="editor-label">
                    Nombre Usuario (*)
                </div>
                <div class="editor-field">
                    @Html.Editor("nombre")<br /> 
                </div>
            </td>
        </tr>

    </table>
</fieldset>
</div><br />

 <b><a href="#" style="text-decoration:none" rel="toggle[datosF]" data-openimage="../../Content/images/minus.jpg" data-closedimage="../../Content/images/plus.png"><img src="../../Content/images/plus.png" border="0" /> Datos Cronológicos </a></b>   
<div id="datosF" style="display:none">
<fieldset>
<br />
<table width="100%">
        <tr>
            <td  width="33%">
                <div class="editor-label">
                    Fecha Adquisición
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dfva)<br /> 
                    @*<input id="dfva" name="dfva" /><br /> *@
                    <label for="dfva" generated="true" class="error"></label>
                    @*@Html.ValidationMessageFor(model => model.dfva)*@
                </div>
            </td>
            <td  width="33%">
                <div class="editor-label">
                    Fecha Inicio Arrendamiento/Garantía
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.diga)<br /> 
                    <label for="diga" generated="true" class="error"></label>
                </div>
            </td>
            <td  width="33%">
                <div class="editor-label">
                    Fecha Final Arrendamiento/Garantía
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dfga)<br />
                    <label for="dfga" generated="true" class="error"></label>
                    <div class="error">@ViewBag.Fail</div>
                </div>
            </td>
        </tr>
    </table>
</fieldset>
</div><br />    

<b><a href="#" style="text-decoration:none" rel="toggle[datosL]" data-openimage="../../Content/images/minus.jpg" data-closedimage="../../Content/images/plus.png"><img src="../../Content/images/plus.png" border="0" /> Datos Localidad </a></b>   
<div id="datosL" style="display:none">
<fieldset>
<br />
<table width="100%">
        <tr>
            <td width="33%">
                <div class="editor-label">
                    Centro Costo (* CPU, Monitor, Laptop)
                </div>
                <div class="editor-field">
                    @*<div id="DialogCecoAsignacion" title="Cecos"></div> *@
                    @*@Html.DropDownList("ceco_id", String.Empty)<br /> *@
                    <input id="ceco_id_Visible" value="@(ViewBag.ceco_id_Visible)" name="ceco_id_Visible" type="text" /><br /> 
                    @Html.ValidationMessageFor(model => model.ceco_id)
                </div>
            </td>
            <td width="33%">
                <div class="editor-label">
                    División (* CPU, Monitor, Laptop)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("DivisionId", String.Empty)<br /> 
                    @Html.ValidationMessageFor(model => model.DivisionId)
                </div>
            </td>
            <td width="33%">
                <div class="editor-label">
                    Sociedad (*)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("SociedadId", String.Empty)<br /> 
                    @Html.ValidationMessageFor(model => model.SociedadId)
                </div>
            </td>
    </tr>
    <tr>
            <td>
                <div class="editor-label">
                    Localidad (*)
                </div>
                <div class="editor-field">
                    @*<div id="DialogLocalidadAsignacion" title="Localidades"></div>*@
                    @*@Html.DropDownList("localidad_id", String.Empty)<br /> *@
                    <input id="localidad_id_Visible" value="@(ViewBag.localidad_id_Visible)" name="localidad_id_Visible" type="text" /><br /> 
                    @Html.ValidationMessageFor(model => model.localidad_id)
                </div> 
            </td>
            <td>
                <div class="editor-label">
                    Ubicación Física (*)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.cubf)<br /> 
                    @Html.ValidationMessageFor(model => model.cubf)
                </div>
            </td>
            <td>

            </td>
    </tr>
    </table>
</fieldset>
</div><br />

<b><a href="#" style="text-decoration:none" rel="toggle[datosD]" data-openimage="../../Content/images/minus.jpg" data-closedimage="../../Content/images/plus.png"><img src="../../Content/images/plus.png" border="0" /> Datos Informatívos </a></b>   
<div id="datosD" style="display:none">
<fieldset>
<br />
<table width="100%">
    <tr>
            <td colspan="3">
                <div class="editor-label">
                    Descripción
                </div>
                <div class="editor-field">
                    @Html.TextAreaFor(model => model.cdes)<br /> 
                    @Html.ValidationMessageFor(model => model.cdes)
                </div>
            </td>
    </tr>
</table>
</fieldset>
</div><br /> 
    
<b><a href="#" style="text-decoration:none" rel="toggle[datosC]" data-openimage="../../Content/images/minus.jpg" data-closedimage="../../Content/images/plus.png"><img src="../../Content/images/plus.png" border="0" /> Envío de Correo </a></b>   
<div id="datosC" style="display:none">
<fieldset>
<br />
 <table width="100%">
                <tr>  
			        <td width="25%">
                        Correo Usuario (*):
                    </td>
                    <td width="25%">
                        @Html.TextBox("email")<br />
                         <div class="error">@ViewBag.FailCorreo</div>
                    </td>
                    <td width="25%">
			             Asunto:
                    </td>
                    <td  width="25%">
			            @Html.TextBox("subject")
                    </td>
	            </tr>

                <tr>                
                     <td>
                         Mensaje:
                    </td>
                    <td colspan"2">
                         @Html.TextArea("body")
                    </td>
                </tr>
</table>
</fieldset>
</div>

        <p>
            <input type="submit" value="Asignar" />
        </p>
   
}
